import { createSlice } from "@reduxjs/toolkit"

const ChatsSlice = createSlice({
    name: "chats",
    initialState: {

        userList: [],
        messageList: []
    },
    reducers: {
        setUserList(state, action) {
            state.userList = action.payload;
        },
        setMessageList(state, action) {
            state.messageList = action.payload;
        }
    }
});
export const {setUserList, setMessageList } = ChatsSlice.actions;
export default ChatsSlice;